#include<iostream>
#include<conio.h>
#include<stdio.h>

using namespace std;

class CPolygon
{
protected:
	int width;
	int height;
public:
	CPolygon(int a);
	void setValues(int a, int b);
};
CPolygon::CPolygon(int a)
{
	width = a;
}
void CPolygon::setValues(int a,int b)
{
	width = a;
	height = b;
}
class CRectangle:public CPolygon
{
public:
	CRectangle(int w, int h);
	int area();
};
CRectangle::CRectangle(int w, int h):CPolygon(w)
{
	height = h;
}
int CRectangle::area()
{
	return( width * height );
}

int main()
{
	CRectangle rect(8, 9);
	cout<<"rect: "<<rect.area()<<endl;
	getch();
	return 0;
}
